$(function () {
    page();
})

function page() {
    let param = {
        "checktag": "S001-0", "designer": $("#designer").val(),
        "registertime": $("#registertime").val()
    };
    $.post("/Mapply.do/WZYmapplyCha", param, function (sdata) {
        let str = "     <tr class=\"table-success\">\n" +
            "            <th>生产计划编号</th>\n" +
            "            <th>计划定制人</th>\n" +
            "            <th>登记人</th>\n" +
            "            <th>登记时间</th>\n" +
            "            <th>备注</th>\n" +
            "            <th>操作</th>\n" +
            "        </tr>\n";
        $.each(sdata, function (index, item) {
            str += "     <tr >\n" +
                "            <td>" + item.applyid + "</td>\n" +
                "            <td>" + item.designer + "</td>\n" +
                "            <td>" + item.register + "</td>\n" +
                "            <td>" + item.registertime + "</td>\n" +
                "            <td>" + item.remark + "</td>\n" +
                "            <td>" +
                "<span style='font-weight: 600;color:" + (item.checktag == 'S001-2' ? 'red' : item.checktag == 'S001-1' ? 'lime' : '') + "'>" +
                (item.checktag == 'S001-2' ? '不通过' : item.checktag == 'S001-1' ? '通过' : '') + "</span></td>\n" +
                "        </tr>\n";
        })
        $("#tableSH").html(str);
    })
}